package com.enzoism.springboot.designpattern.a01observer;

public class ObserverBootStrap {

    public static void main(String[] args) {

        Subject subject = new ConcreteSubject();

        Observer observer = new ConcreteObserver("观察者一号");

        Observer observer2 = new ConcreteOberverOther("观察者二号");

        subject.attach(observer);

        subject.attach(observer2);

        subject.notifyObserver();

    }

}